package com.project.dao.Impl;

import java.util.List;

import org.hibernate.SessionFactory;

import com.project.dao.BaseDAO;
import com.project.vo.BaseVO;

/**
 * @author Administrator
 *
 */
public class BaseDAOImpl implements BaseDAO {

	private SessionFactory sessionFactory;
	@Override
	public BaseVO addVO(BaseVO vo) {

		return null;
	}

	@Override
	public boolean deleteVOById(BaseVO vo) {
		return false;
	}

	@Override
	public BaseVO getVOById(BaseVO vo) {
		assert(vo.getId()!=null);
		BaseVO result = (BaseVO)sessionFactory.openSession().load(vo.getClass(), vo.getId());
		return result;
	}

	@Override
	public List<BaseVO> queryAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<BaseVO> queryVO(BaseVO vo) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<BaseVO> queryVOBySQL(String sql) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void updateVO(BaseVO vo) {
		// TODO Auto-generated method stub

	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

}
